<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>教师列表</title>
    <link rel="stylesheet" href="/css/layui.css">
    <link rel="stylesheet" href="/css/style.css">
    <script src="/js/jquery-3.7.1.min.js"></script>
    <style>
        body{
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .container{
            width: 80%;
        }
    </style>
</head>
<body>

<div class="container">
    <div class="layui-row" style="justify-content: center;display: flex">
        <h1> 学生信息管理</h1>
    </div>
   <div class="header">
       <div class="searhButton">
           <input
                   id="searchContent"
                   placeholder="请输入教师名字">
           <i id="search" class="layui-icon layui-icon-search search"></i>
       </div>
   </div>
    <div>
        <button  onclick="showAddInfoDialog()" type="button" class="layui-btn layui-btn-sm">
            <i class="layui-icon layui-icon-add-1"></i>
        </button>
    </div>
    <table class="layui-table">
        <thead>
        <tr>
            <th>姓名</th>
            <th>学号</th>
            <th>电话</th>
            <th>部门编号</th>
            <th>操作</th>
        </tr>

        <tbody id="tTable">

        </tbody>
        <!--thymeleaf 模板-->
<!--        <tr th:each="teacher:${teacherList}">-->
<!--            <td th:text="${teacher.name}">孔子</td>-->
<!--            <td th:text="${teacher.sn}">华夏</td>-->
<!--            <td th:text="${teacher.phone}">华夏</td>-->
<!--            <td th:text="${teacher.departmentSn}">有朋自远方来，不亦乐乎</td>-->
<!--        </tr>-->

        </thead>
    </table>


    <div class="addInfo" id="addInfo" style="display: none;margin: 10px ">
        <form  class="layui-form layui-form-pane" action="/api/teacher/saveInfo" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="name" autocomplete="off" placeholder="请输入姓名" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">学号</label>
                <div class="layui-input-block">
                    <input type="text" name="sn" autocomplete="off" placeholder="请输入学号" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="text" name="password" autocomplete="off" placeholder="请输入密码" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">电话</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" autocomplete="off" placeholder="请输入联系方式" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit lay-filter="demo2">确认</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </form>
    </div>
</div>

<script src="/js/layui.js"></script>
<script src="/js/pageJs/teacher.js"></script>


</body>
</html>